package com.moss.system.service.impl.sample;

import com.moss.common.constant.Constants;
import com.moss.common.entity.SysSampleEntity;
import com.moss.system.mapper.SampleMapper;
import com.moss.system.service.SampleBranchService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class SampleSelfServiceImpl implements SampleBranchService {

    @Resource
    SampleMapper sampleMapper;


    @Override
    @Transactional(rollbackFor = Exception.class)
    public void saveSample(SysSampleEntity sample) {
        System.out.println("自检");
    }


    @Override
    public String type() {
        return Constants.SELF_SAMPLE;
    }


    @Override
    public SysSampleEntity getDetail(String sampleId) {
        return sampleMapper.selectById(sampleId);
    }
}
